package com.wsm.kotlintest.common.net

import com.wsm.kotlintest.model.response.BaseResponseModel
import com.wsm.kotlintest.model.response.redditResponseModel.Data
import io.reactivex.Observable
import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query

/**
 * Created by 王家宝 on 2018/7/19.
 * TEL:18241150668
 * MAIL:639586819@qq.com
 */
interface API {
    @GET("/r/{subreddit}/hot.json")
    fun getDataFromNet(
            @Path("subreddit") subreddit: String,
            @Query("after") after: String? = null,
            @Query("limit") limit: Int): Observable<BaseResponseModel<Data>>

}